package com.lq.common.api.client;

import com.lq.common.api.dto.ProductDTO;
import com.lq.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.math.BigDecimal;

@FeignClient(name = "product-service")
public interface ProductFeignClient {

    @GetMapping("/products/{id}")
    Result<ProductDTO> getProductById(@PathVariable("id") Long id);
    
    @GetMapping("/products/{id}/price")
    BigDecimal getProductPrice(@PathVariable("id") Long id);
}